home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC Format (PL) 2013 August
/
PC_Format_082013.iso
/
pene wersje
/
website x5 home 10
/
wsx5_home.exe
/
{app}
/
Res
/
Admin
/
blog.php
next >
Wrap
PHP Script
|
2013-04-08
|
2KB
|
50 lines
<?php
require_once("header.php");
@include_once("../res/blog.inc.php");
?>
<div id="imAdminPage">
<div id="imBody">
<div class="imContent">
<!-- Show the available categories -->
<script>
function showCategory( obj ) {
var cat = $( obj ).val();
if ( cat !== "" )
window.top.location.href = '<?php echo basename($_SERVER['PHP_SELF']) ?>?category=' + cat;
else
window.top.location.href = '<?php echo basename($_SERVER['PHP_SELF']) ?>';
}
function showPost( obj, objcat ) {
var post = $( obj ).val(),
cat = $( objcat ).val();
if ( post !== "" && cat !== "" )
window.top.location.href = '<?php echo basename($_SERVER['PHP_SELF']) ?>?category=' + cat + '&post=' + post;
else
window.top.location.href = '<?php echo basename($_SERVER['PHP_SELF']) ?>';
}
</script>
<select name="category" id="category" onchange="showCategory(this)">
<option value=""><?php echo l10n("admin_category_select", "Select a category:")?></option>
<?php foreach($imSettings['blog']['posts_cat'] as $category => $posts): ?>
<option value="<?php echo $category ?>"<?php echo $category == @$_GET['category'] ? " selected" : "" ?>><?php echo str_replace("_", " ", $category) ?></option>
<?php endforeach; ?>
</select>
<?php if (isset($_GET['category'])): ?>
<select name="post" id="post" onchange="showPost(this, '#category')">
<option value=""><?php echo l10n("admin_post_select", "Select a post:")?></option>
<?php foreach($imSettings['blog']['posts_cat'][$_GET['category']] as $post): ?>
<option value="<?php echo $post ?>"<?php echo $post == @$_GET['post'] ? " selected" : "" ?>><?php echo $imSettings['blog']['posts'][$post]['title'] ?></option>
<?php endforeach; ?>
</select>
<?php endif; ?>
<?php
if (isset($_GET['category']) && isset($_GET['post']))
{
}
?>
</div>
</div>
</div>
<?php require_once("footer.php"); ?>